package top.vanchor.myblog2back.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.vanchor.myblog2back.entity.BlogUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ding
 * @since 2021-11-12
 */
@Mapper
public interface BlogUserMapper extends BaseMapper<BlogUser> {

    int isPhoneNumUnique(@Param("phoneNum") String phoneNum);

    BlogUser getUserInfoById(@Param("uId") Integer uId,@Param("loginUserId") Integer loginUserId);

    List<BlogUser> getFriendListById(@Param("id") Integer id);

    List<BlogUser> searchUsers(@Param("searchText") String searchText,@Param("id") Integer id);
}
